package com.jswlw.config;

import com.jswlw.common.factory.YamlPropertyLoaderFactory;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @Author: zhangpei
 * @Date: 2018/6/26 19:50
 * @Description: 连接池属性配置
 */
@Data
@EqualsAndHashCode(callSuper = false)
@PropertySource(value = "classpath:druid.yml", factory = YamlPropertyLoaderFactory.class)
@ConfigurationProperties(prefix = "druid")
@Configuration
public class DruidPropertyConfig {

    String url;
    String username;
    String password;
    String driverClassName;
    Integer initialSize;
    Integer maxActive;
    Integer minIdle;
    Long maxWait;
    Long timeBetweenEvictionRunsMillis;
    Long minEvictableIdleTimeMillis;
    String validationQuery;
    Boolean testWhileIdle;
    Boolean testOnBorrow;
    Boolean testOnReturn;
    Boolean poolPreparedStatements;
    Integer maxPoolPreparedStatementPerConnectionSize;
    String filters;
    String connectionProperties;
    Boolean useGlobalDataSourceStat;

}
